{layout name="public/layout" /}
<!--搜索输入框-->
<div class="layui-row">
        <div class="layui-col-xs6 layui-col-md-offset3">
            <input id="input-search" type="text" name="key" autocomplete="off" placeholder="物料编号/名称" class="layui-input">
        </div>
</div>
<div id="result" style="min-height:500px"></div>

<script>
$(function(){
  $.post("{:url('web/Warehouse/query_get')}",{key:""},function(result){
          $("#result").html(result);
        });
    //绑定输入框事件
    $('#input-search').bind('input propertychange', function() {
        //$('#result').html($(this).val().length + ' characters');
        $.post("{:url('web/Warehouse/query_get')}",{key:$(this).val()},function(result){
          $("#result").html(result);
        });
    });
    
})
</script>